package com.atguigu.day11.exer.e2;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/12 11:55
 * @注释
 */
public class SalaryEmployee extends Employee{
    private double salary;
    private MyDate myDates;

    public SalaryEmployee() {
    }

    public SalaryEmployee(String name, double salary, MyDate myDates) {
        super(name);
        this.salary = salary;
        this.myDates = myDates;
    }

    @Override
    public double earning() {
        return salary;
    }

    @Override
    public String toString() {
        return super.toString() + ",生日：" + myDates.toString();
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public MyDate getMyDates() {
        return myDates;
    }

    public void setMyDates(MyDate myDates) {
        this.myDates = myDates;
    }
}
